<template>
  <nav class="nav-bar">
    <div class="nav-inner">
      <div class="nav-left">
        <router-link to="/" class="brand-logo">NFT 商城</router-link>
      </div>
      <div class="nav-center">
        <router-link to="/" class="nav-link" exact-active-class="nav-link-active">市场首页</router-link>
        <router-link to="/mint" class="nav-link" exact-active-class="nav-link-active">铸造NFT</router-link>
        <router-link to="/my" class="nav-link" exact-active-class="nav-link-active">我的NFT</router-link>
      </div>
      <div class="nav-right">
        <WalletConnect/>
      </div>
    </div>
  </nav>
  <main class="main-bg">
    <router-view />
  </main>
</template>

<script setup>
// 无需额外代码
</script>

<style>
/* 1. 全局字体、颜色、背景统一 */
html, body {
  font-family: 'Segoe UI', 'PingFang SC', 'Helvetica Neue', Arial, 'Microsoft YaHei', sans-serif;
  background: #f7f8fa;
  color: #21344c;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-size: 17px;
}

/* 2. 导航栏商务风 */
.nav-bar {
  width: 100vw;
  background: #fff;
  box-shadow: 0 2px 14px rgba(50, 60, 80, 0.07);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 999;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 32px 10px 24px;
}
.nav-left .brand-logo {
  font-weight: 700;
  font-size: 1.35em;
  letter-spacing: 2px;
  color: #376ee6;
  text-decoration: none;
  padding-right: 18px;
  font-family: 'Segoe UI', 'PingFang SC', Arial, 'Microsoft YaHei', sans-serif;
}
.nav-center {
  display: flex;
  gap: 13px;
  align-items: center;
}
.nav-link {
  color: #21344c;
  font-weight: 500;
  font-size: 1.07em;
  text-decoration: none;
  border-radius: 9px;
  padding: 7px 22px;
  transition: background .16s, color .13s, box-shadow .17s;
  position: relative;
  display: inline-block;
}
.nav-link:hover, .nav-link:focus {
  color: #376ee6;
  background: #f3f8ff;
  box-shadow: 0 2px 8px rgba(60,100,220,0.07);
}
.nav-link-active {
  color: #376ee6 !important;
  font-weight: 600;
  background: #e8f0fe;
  box-shadow: 0 2px 8px rgba(60,100,220,0.10);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* 3. 全局主内容背景 */
.main-bg {
  min-height: calc(100vh - 62px);
  background: #f7f8fa;
  padding-top: 18px;
  padding-bottom: 36px;
}

/* 4. 响应式适配 */
@media (max-width: 700px) {
  .nav-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 7px 2vw 7px 2vw;
    gap: 4px;
  }
  .nav-center {
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
    padding-bottom: 2px;
  }
  .nav-link { padding: 7px 13px; font-size: 1em;}
  .nav-left .brand-logo { font-size: 1em; padding-right: 0;}
  .main-bg { padding-top: 11px; padding-bottom: 24px;}
}

/* 5. 滚动条淡化 */
::-webkit-scrollbar { width: 9px; background: #f1f3f8;}
::-webkit-scrollbar-thumb { background: #e5e7ef; border-radius: 7px; }
::-webkit-scrollbar-thumb:hover { background: #d6dbed; }
</style>
